package com.hfjava.practice01;

/**
 * @author Administrator
 * @version V1.0
 * @ProjectName:IntelliJ IDEA
 * @PackageName: com.hfjava.practice01.MyThread.practice01
 * @ClassName: MyThread
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2019/12/26 19:09
 * @Copyright 大牛版板所有
 */
public class MyThread extends Thread {
    private String name;

    public MyThread(String name1) {
        this.name = name1;
    }

    @Override
    public void run() {
        System.out.println("线程名为："+this.name);
    }


    public static void main(String[] args) {
        MyThread thread1 = new MyThread("线程-1");
        MyThread thread2 = new MyThread("线程-2");
        thread1.start();
        thread2.start();

    }
}
